|
900820_MOOS_Upper_Canyon_Experiment : How to download large files via Globalstar
This page last changed on Dec 28, 2009 by oreilly.
This document describes how to retrieve a single large file to shore, utilizing several separate Globalstar connections. The Globalstar satellite link duration is limited to roughly ten minutes on average due to several factors, including problems aboard the satellites themselves. Thus the number of bytes that can be downloaded during a single connection is limited to several megabytes. However in some cases we would like to download files that exceed this size, e.g. selected portions of instrument logs that capture an interesting science event. We can now download a single large file over several Globalstar connections, utilizing the onboard 'boa' version 94.14 server and its "ranging" feature, and portal-based 'wget' client. This version of boa and wget are designed for robustness over slow or unstable network connections; if a download fails due to a network problem, wget will keep retrying until the whole file has been retrieved from the onboard boa server. As of September 2009 each MMC node includes an old version of 'boa' (/bin/boa) that does not support ranging, as well as boa version 94.14 (/mnt/hda/boa.94.14/boa) which does support ranging. The old boa is configured to listen on port 80, is used to download Java classes, and is automatically started when the node boots. The newer boa 94.14 listens on port 8080 and must be manually started when you wish to download a large file. First create the file to be downloaded on the at-sea "target node". (It is easiest if the target node is "surface" since this node is guaranteed to be awake during a Globalstar connection.) You could do this through the Iridium console. You could also 'ssh' to the target node over the Globalstar ppp link, but this link could disconnect at any time. Another alternative is to create the file with 'autoscript'. Suppose you wish to download all packets from a particular instrument over a specified time range. In this case use the getPackets utility to create log files that contain packets from the specific time range. NOTE: getPackets will create log files in the current working directory, so it is VERY important that you do NOT execute getPackets from the $SIAM/logs directory! Once you are on the target node, execute the following to create a tar file containing the desired packets (e.g. from device 1452 on node21 during a two-day period): cd /mnt/hda/tmp; getPackets node21 -between 2/5/2010 2/7/2010 1452 tar cf myFile.tar 1452.idx 1452.dat Now follow these steps: 1. Start the boa.94.14 server on the target node if it is not already running: cd /mnt/hda/boa.94.14 ./boa -c conf 2. Copy the download file to the boa server's "served" directory: cp /mnt/hda/tmp/myFile.tar /mnt/hda/boa.94.14/served/. 3. On the shore portal machine, add the following to /etc/ppp/ip-up.local, to initiate/continue download via 'wget' when the Globalstar link is connected: # Download a file via 'wget' to the SIAM logs directory, using the "continue" option cd $SIAM/logs; wget -c -a wget.log http://surface:8080/myFile.tar 4. On the shore portal machine, add the following to /etc/ppp/ip-down.local, to terminate any 'wget' processes when the Globalstar link disconnects: # Kill any running wget processes killall wget Now the portal will start a 'wget' process to download your file from the target node ("surface" in this case) when the Globalstar link is connected, and will terminate that wget process when the link is disconnected. Each 'wget' will pick up where the last one left off until the entire file has been retrieved. Subsequent wget processes will immediately abort as long as the complete myFile.tar remains in the portal's $SIAM/logs directory. Informational wget messages will be logged to $SIAM/logs/wget.log. Once the complete file has been downloaded, you can remove the lines added in step 3 to disable automatic execution of 'wget'.
|
| Document generated by Confluence on Feb 03, 2026 15:04 |